#ifndef EJCONFIGMANAGER_H
#define EJCONFIGMANAGER_H
#include "ejconfig.h"
#include <QMap>

class EJConfigManager
{
public:
    ~EJConfigManager();
    static EJConfigManager *getInstance();

public:
    bool      addConfig(const QString &name);
    EJConfig* delConfig(const QString &name);
    EJConfig* getConfig(const QString &name);
    bool      putConfig(const QString &name, EJConfig* cnf);


    static QString getAttrByName(const QString &xmlName, const QStringList &lable, const QString &attrName);
    static QStringList getAttr(const QString &xmlName, const QStringList &lable, const QString &subLable, const QString &attrName);
    static QStringList getValueByName(const QString &xmlName, const QStringList &lable, const QString &subLable);
private:
    EJConfigManager(){}

private:
    QMap<QString, EJConfig*> m_map;

    static EJConfigManager *m_instance;
};

#endif // EJCONFIGMANAGER_H
